package com.myfoon.model.entity.result;


import com.myfoon.model.cacheable.EventCache;
import com.myfoon.model.cacheable.LocationCache;
import com.myfoon.model.cacheable.UserCache;

import java.io.Serializable;

import java.sql.Timestamp;


public class EventOfFriend implements Serializable {    
    private Long id;
    
    private Long ownerId;
    private String ownerPhotoSmall;
    private String ownerFullname;
        
    private Timestamp date;
    private String message;
        
    private Long locationId;    
    private String locationName;
    private String locationCity;
    
    private Timestamp created;
            
    private Integer photoCount = 0;
    private Integer videoCount = 0;

    public EventOfFriend() {
    }
    
    public EventOfFriend(EventCache ec, UserCache uc, LocationCache lc) {
        this.id = ec.getId();
        this.ownerId = ec.getOwnerId();
            
        if (uc != null ) {            
            this.ownerFullname = uc.getFullname();
            this.ownerPhotoSmall = uc.getPhotoSmall();            
        }
        
        if (this.ownerPhotoSmall == null)
        this.ownerPhotoSmall = "";
        
        this.date = ec.getDate();
        this.created = ec.getCreated();
        this.message = ec.getMessage();        
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerPhotoSmall(String ownerPhotoSmall) {
        this.ownerPhotoSmall = ownerPhotoSmall;
    }

    public String getOwnerPhotoSmall() {
        return ownerPhotoSmall;
    }

    public void setOwnerFullname(String ownerFullname) {
        this.ownerFullname = ownerFullname;
    }

    public String getOwnerFullname() {
        return ownerFullname;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    public Timestamp getDate() {
        return date;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setLocationId(Long locationId) {
        this.locationId = locationId;
    }

    public Long getLocationId() {
        return locationId;
    }

    public void setLocationName(String locationName) {
        this.locationName = locationName;
    }

    public String getLocationName() {
        return locationName;
    }

    public void setLocationCity(String locationCity) {
        this.locationCity = locationCity;
    }

    public String getLocationCity() {
        return locationCity;
    }

    public void setCreated(Timestamp created) {
        this.created = created;
    }

    public Timestamp getCreated() {
        return created;
    }

    public void setPhotoCount(Integer photoCount) {
        this.photoCount = photoCount;
    }

    public Integer getPhotoCount() {
        return photoCount;
    }

    public void setVideoCount(Integer videoCount) {
        this.videoCount = videoCount;
    }

    public Integer getVideoCount() {
        return videoCount;
    }    
}
